import { Component, HostBinding, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-opt',
  templateUrl: './opt.component.html',
  styleUrls: ['./opt.component.scss']
})
export class OptComponent implements OnInit {
  @Input() item;
  @Input() disabled = false;
  private _isActive = false;
  @HostBinding('class.active') get isActive() {
    return this._isActive;
  };
  
  constructor() { }

  ngOnInit(): void {
  }
  setActiveStyles() {
    this._isActive = true;
  }
  setInactiveStyles() {
    this._isActive = false;
  }

  getLabel() {
    return this.item.name;
  }

}
